#include <iostream>
#include <string>
#include "addressBook.h"
using namespace std;

int main() {
    ContactPersons contactPersons;
    contactPersons.n = 0;
    int choice;
    do {
        displayMenu();
        cout << "Enter choice: ";
        cin >> choice;
        cout << endl;
        switch (choice) {
            case 1:
                addContactPerson(&contactPersons);
                break;
            case 2:
                searchContactPerson(&contactPersons);
                break;
            case 3:
                deleteContactPerson(&contactPersons);
                break;
            case 4:
                updateContactPerson(&contactPersons);
                break;
            case 5:
                displayAllContactPerson(&contactPersons);
                break;
            case 6:
                deleteAllContactPerson(&contactPersons);
                break;
            case 7:
                cout << "Exit" << endl;
                break;
            default:
                cout << "Invalid choice" << endl;
        }
        system("clear");
    } while (choice != 7);
    return 0;
}
